/**
 * @Description: 连接mongo数据库
 * @Version: 1.0
 * @Author: 琴时
 * @Date: 2021-12-30 10:40:23
 * @LastEditors: 琴时
 * @LastEditTime: 2021-12-30 17:28:39
 */
import mongoose from 'mongoose'
import config from '../../config'
mongoose
  .connect(config.connect, {
    useUnifiedTopology: true,
    useNewUrlParser: true,
  })
  .then(function () {
    console.log('mongo连接数据库成功')
  })
  .catch(function (e) {
    console.log(e)
    console.log('mongo连接数据库失败')
  })
